package com.wing.wcabinet.model.response;

import com.wing.mybatis.common.BaseEntity;
import com.wing.product.model.entity.ProductType;
import com.wing.wcabinet.model.entity.WcabCellInventorySpace;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.wcabinet.model.entity.WcabCheckedResultDetail;
import java.math.BigDecimal;

/**
 * 盘验结果表VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class WcabCheckedResultDetailVO extends BaseEntity {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 盘验结果id
     */
    private Long resultId;

    /**
     * 暂存/回收/维修任务id
     */
    private Long storageInoutId;

    /**
     * 是否同步
     */
    private Boolean isSync;

    /**
     * 柜子id
     */
    private Long cabId;

    /**
     * sku id
     */
    private Long skuId;

    /**
     * 数量
     */
    private Integer quantity;

    /**
     * 重量
     */
    private BigDecimal weight;

    /**
     * 柜子编号
     */
    private String cabCode;

    /**
     * sku 编号
     */
    private String skuCode;

    /**
     * 货道编号
     */
    private String spaceCode;

    /**
     * operationTypeChecked
     */
    private Integer operationTypeChecked;

    /**
     * 业务类型
     */
    private WcabCheckedResultDetail.BusinessTypeChecked businessTypeChecked;

    /**
    * 业务类型描述
    */
    @TableField(exist = false)
    private String businessTypeCheckedDesc;

    public String getBusinessTypeCheckedDesc() {
        if(this.businessTypeChecked!=null){
            return businessTypeChecked.getDesc();
        }
        return "";
    }

    /**
     * quantityCurrentChecked
     */
    private Integer quantityCurrentChecked;

    /**
     * quantityAfterChecked
     */
    private Integer quantityAfterChecked;

    /**
     * repairPrice
     */
    private BigDecimal repairPrice;

    /**
     * 签收数量
     */
    private Integer quantitySign;

    /**
     * 是否已同步：no(0,未同步);yes(1,已同步);
     */
    private Integer isSyns;

    /**
     * 同步时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime synsTime;

    /**
     * 货道id
     */
    private Long spaceId;

    /**
     * enterpriseId
     */
    private Long enterpriseId;

    /**
     * enterpriseCode
     */
    private String enterpriseCode;

    /**
     * 业务类型
     */
    private WcabCheckedResultDetail.BusinessType businessType;

    /**
    * 业务类型描述
    */
    @TableField(exist = false)
    private String businessTypeDesc;

    public String getBusinessTypeDesc() {
        return businessType.getDesc();
    }

    private WcabCheckedResultDetail.OperationType operationType;


    private Integer quantityChecked;

    private BigDecimal weightChecked;

    private String skuCodeChecked;


    /**
     * 产品sku名称
     */
    private String skuName;

    /**
     * 货道库存状态ikistauts
     */
    private Integer spaceStauts;



    /**
     * sku 规格
     */
    private String skuSpec;

    private String skuSpecOld;

    /**
     * sku 图片
     */
    private String skuPic;

    /**
     * 产品名称
     */
    private String productName;

    /**
     * 产品类型名称
     */
    private String productTypeName;

    /**
     * 产品分类名称
     */
    private String productCategoryName;

    /**
     * 产品品牌
     */
    private String productBrandName;

    /**
     * 产品型号
     */
    private String productModelName;

    /**
     * 适配机床
     */
    private String deviceName;

    /**
     * 市场价
     */
    private BigDecimal marketPrice;



    private BigDecimal skuWeightUnit;


    private String unitName;

    private Integer currentQuantity;





    private BigDecimal weightInventory;

    private BigDecimal weightMax;


    private String skuCodeCurrent;


    private BigDecimal baseWeight;

    private String weightUnitName;



    private ProductType.WeightUnit weightUnit;


    private String weightUnitDesc;


    public String getWeightUnitDesc(){
        if (this.weightUnit!=null){
            return this.weightUnit.getDesc();
        }
        return "";
    }

    private String businessTypeCode;

    public String getBusinessTypeCode(){
        if (this.businessType!=null){
            return this.businessType.name();
        }
        return "";
    }


    private String quantityUnitDesc;

    public String getQuantityUnitDesc(){
        return this.unitName;
    }

    private String code;

    private String remark;


}
